# Author: Tylor Zhang, azhen, nemo
# Email: zhangyunqiao@gmail.com, azhenfeixue@gmail.com, nemo@gmail.com

from django.conf.urls.defaults import *

urlpatterns = patterns('',
    # Example:
    (r'^accounts/login/', 'meet001.meetup.account_views.login'),
    (r'^accounts/logout/', 'meet001.meetup.account_views.logout'),
    (r'^accounts/register/', 'meet001.meetup.account_views.register'),
    (r'^accounts/activate/(?P<uuid>[0-9a-zA-Z]+)/', 'meet001.meetup.account_views.activate'),
    (r'^accounts/thanks/', 'meet001.meetup.account_views.thanks'),
    (r'^accounts/profile/', 'meet001.meetup.account_views.profile'),
    (r'^accounts/changepassword/', 'meet001.meetup.account_views.changepassword'),
    (r'^accounts/hp/', 'meet001.meetup.account_views.homepage'),
    (r'^groups/create/', 'meet001.meetup.group_views.create'),
    (r'^groups/thanks/', 'meet001.meetup.group_views.thanks'),
    (r'^groups/join/', 'meet001.meetup.group_views.join'),
    (r'^group/(?P<group_id>\d+)/$', 'meet001.meetup.group_views.details'),
#    (r'^group/(?P<group_id>\d+)/update/$', 'meet001.meetup.group_views.update'),
    # Search a meet group.
    (r'^groups/search/', 'meet001.meetup.group_views.search'),
    (r'^groups/searching/group_name=(?P<group_name>.+)?&city=(?P<city>.+)?&district=(?P<district>.+)?', 'meet001.meetup.group_views.search'),
    (r'^group/(?P<group_id>\d+)/meetup/create/$', 'meet001.meetup.meetup_views.create'),
    (r'^group/(?P<group_id>\d+)/meetup/details/(?P<meetup_id>\d+)/$', 'meet001.meetup.meetup_views.details'),
    (r'^group/(?P<group_id>\d+)/meetup/participate/$', 'meet001.meetup.meetup_views.participate'),
    (r'^group/(?P<group_id>\d+)/meetup/cancel_join/$', 'meet001.meetup.meetup_views.cancel_join'),
#    (r'^group/meetup/detail/', 'meetup.meetup_views.details'),
    # default view
    (r'^$', 'meet001.meetup.group_views.search'),
    (r'^location/district/', 'meet001.meetup.location.render_district'),
    (r'help/', 'meet001.meetup.help.help')
)
